package com.hotel.ordersystem.controller;


import com.baomidou.mybatisplus.extension.api.ApiController;
import com.common.status.ResultMsg;
import com.common.status.StatusCode;
import com.common.utils.ResultUtils;
import com.common.utils.ResultVo;
import com.hotel.ordersystem.pojo.CommentList;
import com.hotel.ordersystem.pojo.FlowList;
import com.hotel.ordersystem.service.FlowListService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;


/**
 * (FlowList)表控制层
 *
 * @author makejava
 * @since 2022-09-30 19:19:21
 */
@Api(value = "FlowListController",tags = {"流水模块"})
@RestController
@RequestMapping("flowList")
public class FlowListController {
    /**
     * 服务对象
     */
    @Resource
    private FlowListService flowListService;

    @ApiOperation(value = "流水列表")
    @GetMapping("/getFlowList")
    public ResultVo<List<FlowList>> getUserList() {
        List<FlowList> list = flowListService.list();
        if (list.size() != 0) return ResultUtils.success(ResultMsg.SUCCESS_MSG, StatusCode.SUCCESS_CODE,list);
        else return ResultUtils.error(ResultMsg.DATA_NULL, StatusCode.SYSTEM_ERROR_CODE,null);
    }
}

